<div class="layui-fluid">
    <div class="layui-card">
      <div class="layui-card-body">
<div class="layui-tab layui-tab-brief" lay-filter="deploy_url">
    <ul class="layui-tab-title">
        <{volist name=":c('type.deploy_group')" id='v'}>
        <li class="<{if $group_id==$key}>layui-this<{/if}>">
            <a href="<{:url('deploy/group','id='.$key)}>"><{$v}>配置</a>
        </li>
        <{/volist}>
    </ul>
    <div class="layui-tab-content" style="padding-left: unset;">
        <div class="layui-tab-item layui-show">
            <div class="layui-row">
                <div class="layui-col-xs12 layui-col-md5">
                    <form action="<{:url('deploy/group','id='.$key)}>" method="post" class="layui-form">
                        <{volist name="list" id="v"}>
                        <div class="layui-form-item">
                            <label class="layui-form-label"><{$v['title']}></label>
                                <div class="layui-input-block">
                                <{switch name="$v['type']"}>
                                    <{case value="1"}>
                                    <input type="text" name="<{$v.name}>" value="<{$v.value ?? ''}>" class="layui-input">
                                    <{/case}>
                                    <{case value="2"}>
                                    <textarea name="<{$v.name}>" class="layui-textarea" rows="4"><{$v.value ?? ''}></textarea>
                                    <{/case}>
                                    <{case value="3"}>
                                    <textarea name="<{$v.name}>" class="layui-textarea" rows="4"><{$v.value ?? ''}></textarea>
                                    <{/case}>
                                    <{case value="4"}>
                                    <select name="<{$v.name}>">
                                    <{notempty name='$v.extra'}>
                                    <{volist name=":parse_config_attr($v['extra'])" id="vo"}>
                                        <option value="<{$key}>" <{if $v['value']==$key}>selected<{/if}> ><{$vo}></option>
                                    <{/volist}>
                                    <{/notempty}>
                                    </select>
                                    <{/case}>
                                    <{case value="5"}>
                                        <input type="number" name="<{$v.name}>" value="<{$v.value ?? ''}>" class="layui-input">
                                    <{/case}>
                                <{/switch}>
                                <div class="layui-form-mid layui-word-aux"><{$v.remark}></div>
                            </div>
                        </div>
                        <{/volist}>

                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="myform">立即提交</button>
                                <button class="layui-btn layui-btn-primary retreat">取消</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
    layui.use(['jquery','element','form'], function () {
        layui.form.render('select');
        layui.element.on('tab(deploy_url)', function () {
            layui.layer.load(2);
            window.location.href = layui.$(this).children('a').attr('href');
        });
    });
</script>
